import os.path
import time
import unittest
from autoframe.page import Shopping_Cart1_page
from HTMLTestRunner import HTMLTestRunner

loader =unittest.defaultTestLoader.loadTestsFromTestCase(Shopping_Cart1_page.prepare)
report = os.path.abspath('report')
filemame=time.strftime('%Y%m%d%H%M%S') +'-demo.html'
filepath = os.path.join(report,filemame)

with open(filepath,mode='wb') as f:

    runner= HTMLTestRunner(
        title='创创猫',
        description='购物车模块',
        tester='叶勇',
        stream=f,
        verbosity=2

    )
    runner.run(loader)
    f.close()

